package com.ls.mianshi;

import java.util.ArrayList;

public class FailFastTest {

    public static void main(String[] args) {
        ArrayList<String> arrayList = new ArrayList<String>();
        arrayList.add("A");
        arrayList.add("B");
        arrayList.add("C");

        for (String s : arrayList) {
            if (s.equals("C")){
                arrayList.add("D");
            }
            System.out.println(s);
        }
    }
}
